const path = require('path')

const resolve = dir => path.join(__dirname, dir)

const BASE_URL = process.env.NODE_ENV === 'production' ? '/' : '/'

module.exports = {
    lintOnSave: false,
    baseUrl: BASE_URL, // 根据生产还是开发环境配置包
    chainWebpack: config => {
        config.resolve.alias
            .set('@', resolve('src')) //src 文件可以缩写为@
            .set('_c', resolve('src/components'))
    },
    // 打包时不生成.map文件
    productionSourceMap: false,
    devServer: {
        // proxy: 'http://localhost:3000'
    },
}
